package cn.edu.xhu.library_management.common.entity;

/**
 * @Author: MMJ
 * @Date: 2022-01-26
 * @Description:
 */
public enum ResultCode {
    SUCCESS(2001,"成功"),
    ERROR(3001,"失败"),
    OPERATION_SUCCESS(2002,"操作成功"),
    OPERATION_ERROR(3002,"操作失败"),
    TOKEN_OVERTIME(4001,"Token过期"),
    TOKEN_ERROR(4002,"非法修改token");

    private int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
